from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def index():
    return {
        "code": 0,
        "msg": "success",
        "data": "fastapi"
    }


@app.get("/books")
def book_list():
    return {
        "code": 0,
        "msg": "success",
        "data": []
    }


@app.get("/books/{b_id}")
def book_list(b_id):
    return {
        "code": 0,
        "msg": "success",
        "data": {}
    }
